import request from "@/utils/request.js";

// 获取我的站内信
export function getMyInboxMessages(query) {
    return request({
        url: '/chatUser/chatUser/getMyInboxMessages',
        method: 'get',
        params: query
    })
}

// 获取消息详情
export const getMessageDetail = (id) => {
    return request({
        url: `/chatUser/chatUser/${id}`,
        method: 'get'
    })
}

// 消息已读
export const markAsRead = (messageId) => {
    return request({
        url: `/chatUser/chatUser/read/${messageId}`,
        method: 'put'
    })
}

export function deleteMessage(messageId){
    return request({
        url: `/chatUser/chatUser/${messageId}`,
        method: 'delete'
    })
}
